﻿using System.ComponentModel;
using System.Windows;
using System.Windows.Forms;

namespace BookvarWpf.Windows
{
	/// <summary>
	/// Interaction logic for ErrorWindow.xaml
	/// </summary>
	public partial class UpdateWindow
	{

		public double ProgressValue
		{
			get { return (double) GetValue( ProgressValueProperty ); }
			set { SetValue( ProgressValueProperty, value ); }
		}

		public static readonly DependencyProperty ProgressValueProperty =
			DependencyProperty.Register( "ProgressValue", typeof ( double ), typeof ( UpdateWindow ),
			                             new UIPropertyMetadata( 0.0 ) );


		public bool IsProgressVisible
		{
			get { return (bool) GetValue( IsProgressVisibleProperty ); }
			set { SetValue( IsProgressVisibleProperty, value ); }
		}

		public static readonly DependencyProperty IsProgressVisibleProperty =
			DependencyProperty.Register( "IsProgressVisible", typeof ( bool ), typeof ( UpdateWindow ),
			                             new UIPropertyMetadata( false ) );


		public string UpdatingProcessText
		{
			get { return (string) GetValue( UpdatingProcessTextProperty ); }
			set { SetValue( UpdatingProcessTextProperty, value ); }
		}

		public static readonly DependencyProperty UpdatingProcessTextProperty =
			DependencyProperty.Register( "UpdatingProcessText", typeof ( string ), typeof ( UpdateWindow ),
			                             new UIPropertyMetadata( string.Empty ) );


		public bool IsOkButtonVisible
		{
			get { return (bool) GetValue(IsOkButtonVisibleProperty); }
			set { SetValue(IsOkButtonVisibleProperty, value); }
		}

		// Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
		public static readonly DependencyProperty IsOkButtonVisibleProperty =
			DependencyProperty.Register("IsOkButtonVisible", typeof(bool), typeof(UpdateWindow), new UIPropertyMetadata(false));

		public bool IsCancelButtonVisible
		{
			get { return (bool) GetValue(IsCancelButtonVisibleProperty); }
			set { SetValue(IsCancelButtonVisibleProperty, value); }
		}

		// Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
		public static readonly DependencyProperty IsCancelButtonVisibleProperty =
			DependencyProperty.Register("IsCancelButtonVisible", typeof(bool), typeof(UpdateWindow), new UIPropertyMetadata(false));

		public bool IsYesButtonVisible
		{
			get { return (bool) GetValue(IsYesButtonVisibleProperty); }
			set { SetValue(IsYesButtonVisibleProperty, value); }
		}

		// Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
		public static readonly DependencyProperty IsYesButtonVisibleProperty =
			DependencyProperty.Register("IsYesButtonVisible", typeof(bool), typeof(UpdateWindow), new UIPropertyMetadata(false));

		public bool IsNoButtonVisible
		{
			get { return (bool) GetValue(IsNoButtonVisibleProperty); }
			set { SetValue(IsNoButtonVisibleProperty, value); }
		}

		// Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
		public static readonly DependencyProperty IsNoButtonVisibleProperty =
			DependencyProperty.Register("IsNoButtonVisible", typeof(bool), typeof(UpdateWindow), new UIPropertyMetadata(false));



		public UpdateWindow()
		{
			InitializeComponent();
		}



		private void btnYes_Click( object sender, RoutedEventArgs e )
		{
			DialogResult = true;
		}

		private void btnNo_Click( object sender, RoutedEventArgs e )
		{
			DialogResult = false;
			
		}
		private void btnOK_Click(object sender, RoutedEventArgs e)
		{
			DialogResult = true;

		}
		private void btnCancel_Click( object sender, RoutedEventArgs e )
		{
			Close();
		}
		
		
	}
}